package cn.gson.oasys.service.AoaTaskListService;

import cn.gson.oasys.mapper.AoaTaskListMapper;
import cn.gson.oasys.pojo.AoaTaskList;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * Created by 刘雯欣 on 2020/11/30.
 * 任务管理后端业务处理
 */
@Service
public class AoaTaskListService {

    @Resource
    private AoaTaskListMapper aoaTaskListMapper;

    //进入页面查询所有任务 by 刘雯欣 on 2020/11/30.
    public List<AoaTaskList> findAllAoaTaskList(){
        System.out.println(aoaTaskListMapper.findAllAoaTaskList()+"hahaha");
        return aoaTaskListMapper.findAllAoaTaskList();
    }

    //查询所有任务后的模糊查询 by 刘雯欣 on 2020/11/30.12
    public List<AoaTaskList> likefindAllAoaTaskList(String title){
        return aoaTaskListMapper.likefindAllAoaTaskList(title);
    }

    //新增任务 by 刘雯欣 on 2020/11/30.
    public int insertSelective(AoaTaskList record){
        return aoaTaskListMapper.insertSelective(record);
    }

    //删除任务 执行此方法之前需删除两个与之有关的关联表 by 刘雯欣 on 2020/12/01.
    public int deleteByPrimaryKey(Long taskId){
        return aoaTaskListMapper.deleteByPrimaryKey(taskId);
    }

    //修改任务 by 刘雯欣 on 2020/12/01
    public int updateByPrimaryKeySelective(AoaTaskList record){
        return aoaTaskListMapper.updateByPrimaryKeySelective(record);
    }
}
